package edu.upenn.cis350.algoviz;
import android.graphics.Bitmap;
import android.graphics.Color;

/**
 * An object with a specified weight, value, and type.
 */
public class BinObject extends ShapeObject {
	
	private double imageID, weight, value, xdiff, ydiff;
	private String type;
	private Bitmap bitmap, bitmap_small;
	private boolean isInSolution = false;
	
	BinObject(double imageID, double weight, double value, String type) {
		super(Color.BLUE, 60, 60, 0, 0, weight + ", $" + value);
		this.imageID = imageID;
		this.weight = weight;
		this.value = value;
		this.type = type;
	}
	
	BinObject(double imageID, double weight, double value, String type, int c) {
		super(c, 60, 60, 0, 0, weight + ", $" + value);
		this.imageID = imageID;
		this.weight = weight;
		this.value = value;
		this.type = type;
	}
	
	public void setBitmap(Bitmap b) { bitmap = b; }
	public Bitmap getBitmap() {return bitmap; }
	public void setBitmap_small(Bitmap b) { bitmap_small = b; }
	public Bitmap getBitmap_small() {return bitmap_small; }
	public double getImageID() {return imageID;}
	public double getWeight() { return weight; }
	public double getValue() { return value; }
	public double getXDiff() { return xdiff; }
	public double getYDiff() { return ydiff; }
	public String getType() { return type; }
	public void setIsInSolution(boolean b) { isInSolution = b; }
	public boolean getIsInSolution() { return isInSolution; }
	
	// Set the xdiff value, used to correct snapping
	public void setXDiff(double xdiff) {
		this.xdiff = xdiff;
	}
	
	// Set the ydiff value, used to correct snapping
	public void setYDiff(double ydiff) {
		this.ydiff = ydiff;
	}
}
